package com.xuexi.api;

import com.easygo.utils.PageUtils;
import com.xuexi.easygo.pojo.Content;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("easygo-advert-service")
public interface ContentClient {

    @RequestMapping("content_page")
    PageUtils<Content> getContent_Page(@RequestParam(defaultValue = "1",required = false,value = "pageIndex") Integer pageIndex,
                                              @RequestParam(defaultValue = "5",required = false,value = "pageSize") Integer pageSize);

    @RequestMapping("content_updateStatus")
    Integer updateStatus(@RequestParam(value = "id") Integer id,
                         @RequestParam(value = "status") Integer status);

    @RequestMapping("content_add")
    Integer addContent(@RequestBody Content content);

    @RequestMapping("content_getContentById")
    Content getContentById(@RequestParam(value = "id") Integer id);

    @RequestMapping("content_update")
    Integer content_update(@RequestBody Content content);
}
